package com.tang.functions;

import com.tang.bean.WaterSensor;
import org.apache.flink.api.common.functions.FilterFunction;

/**
 * Filter实现类
 *
 * @author tang
 * @since 2023/6/7 10:14
 */
public class FilterFunctionImpl implements FilterFunction<WaterSensor> {

    public String id;

    public FilterFunctionImpl(String id) {
        this.id = id;
    }

    @Override
    public boolean filter(WaterSensor value) throws Exception {
        return this.id.equals(value.id);
    }
    
}
